//
//  EmptyDataViewController.h
//  EmptyViewController
//
//  Created by iOS开发 on 2018/7/18.
//  Copyright © 2018年 iOS开发. All rights reserved.
//

#import <UIKit/UIKit.h>

#define WIDTH ([[UIScreen mainScreen] bounds].size.width)
#define HEIGHT [UIScreen mainScreen].bounds.size.height - kDifference
#define kTabBarHeight 49
//自适应宽高
#define kAutoSizeX(size) (size) * WIDTH / 375.f
#define kAutoSizeY(size) (size) * HEIGHT / 667.f

#define NAVHEIGHT 44                                    // 导航栏
#define STATUSHEIGHT ([[UIApplication sharedApplication] statusBarFrame].size.height) // 状态栏 正常20 iPhoneX 44
#define kCustomNav (NAVHEIGHT + STATUSHEIGHT)           // 导航栏+状态栏
#define kDifference ((STATUSHEIGHT > 20) ?34:0)         // 底部homebar

typedef NS_ENUM(NSUInteger, EmptyType) {
    kNoNetwork,// 无网络
    kNoData,// 无数据
    kCustom,// 自定义
};


@interface EmptyDataViewController : UIViewController

@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) UICollectionViewFlowLayout *flowLayout;
@property (nonatomic, strong) UICollectionView *collection;

// 空白页样式
@property (nonatomic, assign) EmptyType emptyStyle;
// 是否隐藏占位图
@property (nonatomic, assign) BOOL isHiddenEmpty;

// 视图点击事件
- (void)emptyDataSet:(UIScrollView *)scrollView didTapView:(UIView *)view;
// 按钮点击事件
- (void)emptyDataSet:(UIScrollView *)scrollView didTapButton:(UIButton *)button;
// 刷新
- (void)noNetworkReload;
- (void)noDataReload;


#pragma mark - kCustom
@property (nonatomic, copy) NSAttributedString *emptyTitle;// 占位图标题
@property (nonatomic, copy) NSAttributedString *emptyExplain;// 占位图说明
@property (nonatomic, copy) NSAttributedString *emptyButtonTitle;// 占位图按钮文案
@property (nonatomic, strong) UIImage *emptyImage;// 占位图图片

@end
